<?php

define("DIVISION", "division" );

define("TOURNY", "tourny" );

define("YEAR", "year" );
define("FNAME", "fname" );
define("LNAME", "lname" );
define("GENDER", "gender" );
define("NTRP", "ntrp" );

define("ADDRESS", "address" );
define("CITY", "city" );
define("ZIP", "zip" );

define("AREACODE", "areacode" );
define("PHONE", "phone" );

define("EMAIL", "email" );
define("URL", "url" );
define("PAID", "paid" );


define("AREACODE", "areacode" );
define("PHONEPRE", "phonepre" );
define("PHONEPOST", "phonepost" );

define("MEMBER", "member" );

define("FNAME1", "fname1" );
define("LNAME1", "lname1" );
define("GENDER1", "gender1" );
define("NTRP1", "ntrp1" );

define("FNAME2", "fname2" );
define("LNAME2", "lname2" );
define("GENDER2", "gender2" );
define("NTRP2", "ntrp2" );


define("FNAME3", "fname3" );
define("LNAME3", "lname3" );
define("GENDER3", "gender3" );
define("NTRP3", "ntrp3" );

define("FNAME4", "fname4" );
define("LNAME4", "lname4" );
define("GENDER4", "gender4" );
define("NTRP4", "ntrp4" );



function println($v)
{
     print $v."<br>";

}

function add ($p)
{
   return ',"'.$p.'"';
}


function Cell(  $data )
{
   echo "<td> $data </td>";
}

function rand_string( $length ) {
	 $chars = "abcdefghijklmnopqrstuvwxyz";	

	 $size = strlen( $chars );
	 for( $i = 0; $i < $length; $i++ ) {
	      $str .= $chars[ rand( 0, $size - 1 ) ];
	      }

	      return $str;
}

function LocalHost()
{

   $ret=1;
   if(strstr($_SERVER["SERVER_NAME"],"sctennis")) $ret = 0;
   
   return $ret;

}

function DBConnect()
{

	$HOST = "127.0.0.1";
        $USER = "root";
        $PASSWORD = "tomato";
        $DB= "sctc";

        if(strstr($_SERVER["SERVER_NAME"],"sctennis")){

	    $HOST = "sctennisclub.globatmysql.com";
            $USER="roger";
            $PASSWORD="tomato";
        }

//      echo $HOST." ".$USER." ".$PASSWORD;
	mysql_connect($HOST,$USER, $PASSWORD) or
		die('Could not connect: <font color="red">'.mysql_error().'</font>');

	mysql_select_db($DB);



}

?>
